<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Glod-Login</title>
    <meta name="description" content="">
    <meta name="keywords" content="">
    <link rel="stylesheet" href="./css/bootstrap.min.css">
    <link rel="stylesheet" href="./css/common.css">
    <link href="./css/toastr.min.css" rel="stylesheet" />
    <script src="./js/bootstrap.min.js"></script>
    <script src="./js/jquery.min.js"></script>
    <script src="./js/iconfont.js"></script>
    <script src="./js/toastr.min.js"></script>
    <style type="text/css">
        body {
            background: url(image/bg.png);
            background-size: cover;
            color: #fff;
        }

        a {
            color: #fff;
        }

        .login-panel {
            margin-top: 150px;
        }

        .login-screen {
            margin: 75pt auto 0;
            padding: 0;
            max-width: 25pc;
        }

        .login-screen .well {
            border-radius: 3px;
            background: hsla(0, 0%, 100%, .2);
            box-shadow: 0 0 10px rgba(0, 0, 0, .1);
        }

        .login-screen .copyright {
            text-align: center;
        }

        @media(max-width:767px) {
            .login-screen {
                padding: 0 20px;
            }
        }

        .profile-img-card {
            display: block;
            margin: 10px auto;
            width: 75pt;
            height: 75pt;
            border-radius: 50%;
        }

        .profile-name-card {
            text-align: center;
        }

        .login-form-input {
            line-height: 2rem
        }

        #login-form {
            margin-top: 20px;
        }

        #login-form .input-group {
            margin-bottom: 15px;
        }

        .captcha_cl {
            color: #f91b04;
            font-size: 14px;
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="login-screen">
            <div class="well p-a">
                <div class="login-form">
                    <img id="profile-img" class="profile-img-card" src="./image/avatar.png" />
                    <p id="profile-name" class="profile-name-card"></p>

                    <form id="login-form" onsubmit="return false;">
                        <div id="errtips" class="hide"></div>
                        <input type="hidden" value="" />
                        <div class="input-group">
                            <div class="input-group-addon login-form-input">
                                <svg class="icon" aria-hidden="true">
                                    <use xlink:href="#icon-username"></use>
                                </svg>
                            </div>
                            <input type="text" class="form-control login-form-input" id="login-form-username" placeholder="用户名" name="username" value=""
                            />
                        </div>

                        <div class="input-group">
                            <div class="input-group-addon login-form-input">
                                <svg class="icon" aria-hidden="true">
                                    <use xlink:href="#icon-password"></use>
                                </svg>
                            </div>
                            <input type="password" class="form-control login-form-input" id="login-form-password" placeholder="密码" name="password" value=""
                            />
                        </div>

                        <div class="input-group">
                            <div class="input-group-addon login-form-input">
                                <svg class="icon" aria-hidden="true">
                                    <use xlink:href="#icon-code"></use>
                                </svg>
                            </div>
                            <input type="text" class="form-control login-form-input" id="login-form-password" placeholder="验证码" name="code" autocomplete="off"
                                value="" />
                        </div>

                        <div class="form-group">
                            <img src="./image/captcha.png" class="p-r-md" alt="captcha" onclick="">
                            <span class="captcha_cl ">看不清？点击图片刷新一下</span>
                        </div>

                        <div class="form-group">
                            <label class="inline" for="keeplogin">
                                <input type="checkbox" name="keeplogin" id="keeplogin" value="1" /> 保持会话 </label>
                        </div>
                        <div class="form-group">
                            <button id="login-submit" type="submit" class="btn btn-success btn-lg btn-block">登 录</button>
                        </div>
                    </form>
                </div>
            </div>
            <p class="copyright">
                <a href="">Powered By GuardAdmin</a>
            </p>
        </div>
    </div>
    <script>
        $(function () {
            toastr.options = {
                "closeButton": false, //显示关闭按钮
                "debug": false, //启用debug
                "positionClass": "toast-top-full-width", //弹出的位置
                "showDuration": "300", //显示的时间
                "hideDuration": "1000", //消失的时间
                "timeOut": "5000", //停留的时间
                "extendedTimeOut": "1000", //控制时间
                "showEasing": "swing", //显示时的动画缓冲方式
                "hideEasing": "linear", //消失时的动画缓冲方式
                "showMethod": "fadeIn", //显示时的动画方式
                "hideMethod": "fadeOut" //消失时的动画方式
            };
        });
        $('.login-form').submit(function () {
            if ($("input[name='username']").val() == '') {
                toastr.options.escapeHtml = true;
                toastr.options.onShown = function () {
                    console.log('hello');
                }

                toastr.error('用户不能为空?', 'Turtle Bay Resort', {
                    timeOut: 500
                });
            }
        })
    </script>
</body>

</html>